/*
 *email: chen983@sina.com
 */
#ifndef _CONNECTION_H__
#define _CONNECTION_H__
#include <string>
using namespace std;

namespace Oracle{
typedef void *sql_context;
class Command;

class Connection
{
	friend class Command;
public:
	Connection();
	Connection(const string &connectionString);
	void construct();
	~Connection();
	
	void open();
	void close();
	
public:
	string connectionString;
	
public:
	static unsigned int getsqlctx();

private:
	sql_context _ctx;
	bool _open;
	int *_flag;
	//unsigned int sqlctx;	
};

};//end of namespace Oracle
#endif
